home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / internet / sweeper / samples / olecon~1 / framewrk / ctlhelp.h < prev    next >
Text File  |  1995-11-30  |  9KB  |  184 lines

  1. //=--------------------------------------------------------------------------=
  2. // CtlHelper.H
  3. //=--------------------------------------------------------------------------=
  4. // Copyright  1995  Microsoft Corporation.  All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // routines to help out our implementation of COleControl.
  13. //
  14.  
  15. //=--------------------------------------------------------------------------=
  16. // these two tables are used to get information on sizes about data types
  17. // the first is used mostly in persistence, while the second is used for
  18. // events
  19. //
  20. extern const BYTE g_rgcbDataTypeSize [];
  21. extern const BYTE g_rgcbPromotedDataTypeSize [];
  22.  
  23.  
  24.  
  25. //=--------------------------------------------------------------------------=
  26. // misc functions
  27. //
  28. short       _SpecialKeyState(void);
  29. void WINAPI CopyAndAddRefObject(void *, const void *, DWORD);
  30. void WINAPI CopyOleVerb(void *, const void *, DWORD);
  31.  
  32. HWND        CreateReflectWindow(BOOL fVisible, HWND hwndParent, int, int, SIZEL *);
  33. void        CleanupReflection();
  34.  
  35. // {00D97180-FCF7-11ce-A09E-00AA0062BE57}
  36. //
  37. DEFINE_GUID(IID_IControlPrv, 0xd97180, 0xfcf7, 0x11ce, 0xa0, 0x9e, 0x0, 0xaa, 0x0, 0x62, 0xbe, 0x57);
  38.  
  39. //=--------------------------------------------------------------------------=
  40. // Data1_
  41. //=--------------------------------------------------------------------------=
  42. // the first dword of GUIDs for most of the interesting interfaces.  these are
  43. // used by speed critical versions of QueryInterface
  44. //
  45. #define Data1_IControlPrv                  0x00d97180
  46. #define Data1_IAdviseSink                  0x0000010f
  47. #define Data1_IAdviseSink2                 0x00000125
  48. #define Data1_IAPrinter                    0x91582580
  49. #define Data1_IBindCtx                     0x0000000e
  50. #define Data1_IBoundObject                 0x9BFBBC00
  51. #define Data1_IBoundObjectSite             0x9BFBBC01
  52. #define Data1_ICachedTypeInfo              0xAAEDEB49
  53. #define Data1_IClassFactory                0x00000001
  54. #define Data1_IClassFactory2               0xb196b28f
  55. #define Data1_IConnectionPoint             0xb196b286
  56. #define Data1_IConnectionPointContainer    0xb196b284
  57. #define Data1_IControl                     0xa7fddba0
  58. #define Data1_ICreateErrorInfo             0x22f03340
  59. #define Data1_ICreateTypeInfo              0x00020405
  60. #define Data1_ICreateTypeLib               0x00020406
  61. #define Data1_IDataAdviseHolder            0x00000110
  62. #define Data1_IDataFrame                   0x97F254E0
  63. #define Data1_IDataObject                  0x0000010e
  64. #define Data1_IDispatch                    0x00020400
  65. #define Data1_IDropSource                  0x00000121
  66. #define Data1_IDropTarget                  0x00000122
  67. #define Data1_IEnumCallback                0x00000108
  68. #define Data1_IEnumConnectionPoints        0xb196b285
  69. #define Data1_IEnumConnections             0xb196b287
  70. #define Data1_IEnumFORMATETC               0x00000103
  71. #define Data1_IEnumGeneric                 0x00000106
  72. #define Data1_IEnumHolder                  0x00000107
  73. #define Data1_IEnumMoniker                 0x00000102
  74. #define Data1_IEnumOLEVERB                 0x00000104
  75. #define Data1_IEnumSTATDATA                0x00000105
  76. #define Data1_IEnumSTATSTG                 0x0000000d
  77. #define Data1_IEnumString                  0x00000101
  78. #define Data1_IEnumUnknown                 0x00000100
  79. #define Data1_IEnumVARIANT                 0x00020404
  80. #define Data1_IErrorInfo                   0x1cf2b120
  81. #define Data1_IExternalConnection          0x00000019
  82. #define Data1_IFont                        0xbef6e002
  83. #define Data1_IFontDisp                    0xbef6e003
  84. #define Data1_IFormExpert                  0x5aac7f70
  85. #define Data1_IGetOleObject                0x8A701DA0
  86. #define Data1_IGetVBAObject                0x91733A60
  87. #define Data1_IInternalMoniker             0x00000011
  88. #define Data1_ILockBytes                   0x0000000a
  89. #define Data1_IMalloc                      0x00000002
  90. #define Data1_IMarshal                     0x00000003
  91. #define Data1_IMessageFilter               0x00000016
  92. #define Data1_IMoniker                     0x0000000f
  93. #define Data1_IMsoCommandTarget            0xb722bccb
  94. #define Data1_IMsoDocument                 0xb722bcc5
  95. #define Data1_IMsoInPlaceComponent         0x000C0604
  96. #define Data1_IMsoView                     0xb722bcc6
  97. #define Data1_InternalTypeInfo             0x55930448
  98. #define Data1_IOleAdviseHolder             0x00000111
  99. #define Data1_IOleCache                    0x0000011e
  100. #define Data1_IOleCache2                   0x00000128
  101. #define Data1_IOleCacheControl             0x00000129
  102. #define Data1_IOleClientSite               0x00000118
  103. #define Data1_IOleContainer                0x0000011b
  104. #define Data1_IOleControl                  0xb196b288
  105. #define Data1_IOleControlSite              0xb196b289
  106. #define Data1_IOleInPlaceActiveObject      0x00000117
  107. #define Data1_IOleInPlaceFrame             0x00000116
  108. #define Data1_IOleInPlaceObject            0x00000113
  109. #define Data1_IOleInPlaceObject2           0x1c2056cc
  110. #define Data1_IOleInPlacePaint             0x3af24291
  111. #define Data1_IOleInPlaceSite              0x00000119
  112. #define Data1_IOleInPlaceSite2             0x1c2056cd
  113. #define Data1_IOleInPlaceUIWindow          0x00000115
  114. #define Data1_IOleItemContainer            0x0000011c
  115. #define Data1_IOleLink                     0x0000011d
  116. #define Data1_IOleManager                  0x0000011f
  117. #define Data1_IOleObject                   0x00000112
  118. #define Data1_IOlePresObj                  0x00000120
  119. #define Data1_IOleWindow                   0x00000114
  120. #define Data1_IPSFactory                   0x00000009
  121. #define Data1_IPSFactoryBuffer             0xd5f569d0
  122. #define Data1_IParseDisplayName            0x0000011a
  123. #define Data1_IPerPropertyBrowsing         0x376bd3aa
  124. #define Data1_IPersist                     0x0000010c
  125. #define Data1_IPersistFile                 0x0000010b
  126. #define Data1_IPersistPropertyBag          0x37D84F60
  127. #define Data1_IPersistStorage              0x0000010a
  128. #define Data1_IPersistStream               0x00000109
  129. #define Data1_IPersistStreamInit           0x7fd52380
  130. #define Data1_IPicture                     0x7bf80980
  131. #define Data1_IPictureDisp                 0x7bf80981
  132. #define Data1_IPropertyBag                 0x55272A00
  133. #define Data1_IPropertyFrame               0xb196b28a
  134. #define Data1_IPropertyNotifySink          0x9bfbbc02
  135. #define Data1_IPropertyPage                0xb196b28d
  136. #define Data1_IPropertyPage2               0x01e44665
  137. #define Data1_IPropertyPageSite            0xb196b28c
  138. #define Data1_IProvideClassInfo            0xb196b283
  139. #define Data1_IProxy                       0x00000027
  140. #define Data1_IProxyManager                0x00000008
  141. #define Data1_IQuickActivate               0x8E673D70
  142. #define Data1_IRootStorage                 0x00000012
  143. #define Data1_IRpcChannel                  0x00000004
  144. #define Data1_IRpcChannelBuffer            0xd5f56b60
  145. #define Data1_IRpcProxy                    0x00000007
  146. #define Data1_IRpcProxyBuffer              0xd5f56a34
  147. #define Data1_IRpcStub                     0x00000005
  148. #define Data1_IRpcStubBuffer               0xd5f56afc
  149. #define Data1_IRunnableObject              0x00000126
  150. #define Data1_IRunningObjectTable          0x00000010
  151. #define Data1_IServiceProvider             0x6d5140c1
  152. #define Data1_ISimpleFrameSite             0x742b0e01
  153. #define Data1_ISpecifyPropertyPages        0xb196b28b
  154. #define Data1_IStdMarshalInfo              0x00000018
  155. #define Data1_IStorage                     0x0000000b
  156. #define Data1_IStream                      0x0000000c
  157. #define Data1_IStub                        0x00000026
  158. #define Data1_IStubManager                 0x00000006
  159. #define Data1_ISupportErrorInfo            0xdf0b3d60
  160. #define Data1_ITypeComp                    0x00020403
  161. #define Data1_ITypeInfo                    0x00020401
  162. #define Data1_ITypeLib                     0x00020402
  163. #define Data1_IUnknown                     0x00000000
  164. #define Data1_IVbaPrint                    0x000204F0
  165. #define Data1_IVBControl                   0xFCFB3D26
  166. #define Data1_IVBDDE                       0xCC867200
  167. #define Data1_IVBDDESite                   0xD856BCC0
  168. #define Data1_IVBDSC                       0x1ab42240
  169. #define Data1_IVBGetControl                0x40A050A0
  170. #define Data1_IViewObject                  0x0000010d
  171. #define Data1_IViewObject2                 0x00000127
  172. #define Data1_IViewObject3                 0x3af24292
  173. #define Data1_IWeakRef                     0x0000001a
  174.  
  175.  
  176. #define QI_INHERITS(pObj, itf)              \
  177.     case Data1_##itf:                       \
  178.       if(DO_GUIDS_MATCH(riid, IID_##itf))    \
  179.       {                                     \
  180.         *ppvObjOut = (void *)(itf *)pObj;   \
  181.       }                                     \
  182.       break;
  183.  
  184.